//
//  SearchTableViewCell.m
//  B段项目
//
//  Created by 徐茂怀 on 15/11/9.
//  Copyright © 2015年 徐茂怀. All rights reserved.
//

#import "SearchTableViewCell.h"
#import "FitHeader.h"

@implementation SearchTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _FirstPageImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_FirstPageImageView];
        
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.font = [UIFont systemFontOfSize:18 *FitWidth];
        [self.contentView addSubview:_titleLabel];
        
        _categoryLabel = [[UILabel alloc]init];
        _categoryLabel.font = [UIFont systemFontOfSize:12 *FitWidth];
        [self.contentView addSubview:_categoryLabel];
        
        _ageLabel = [[UILabel alloc]init];
        _ageLabel.font= [UIFont systemFontOfSize:12 *FitWidth];
        [self.contentView addSubview:_ageLabel];
        
        _effectLabel = [[UILabel alloc]init];
        _effectLabel.font = [UIFont systemFontOfSize:12 * FitWidth];
        [self.contentView addSubview:_effectLabel];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _FirstPageImageView.frame = CGRectMake(5 *FitWidth, 5 * FitHeight, 140 * FitWidth, 90 *FitHeight);
    _titleLabel.frame = CGRectMake(150 *FitWidth, 5 *FitHeight, 180 *FitWidth, 20 *FitHeight);
    _categoryLabel.frame = CGRectMake(150 *FitWidth, 25 *FitHeight, 180 *FitWidth, 20 *FitHeight);
    _ageLabel.frame = CGRectMake(150 *FitWidth, 45 *FitHeight, 180 *FitWidth, 20 *FitHeight);
    _effectLabel.frame = CGRectMake(150 *FitWidth, 65 *FitHeight, 180 *FitWidth, 20 *FitHeight);
    //右三角
    UIImageView *rightImageView = [[UIImageView alloc]initWithFrame:CGRectMake(355 * FitWidth, 45 * FitHeight, 15 * FitWidth, 15 * FitHeight)];
    rightImageView.image = [UIImage imageNamed:@"iconfont-xiangyoujianjiao.png"];
    [self.contentView addSubview:rightImageView];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
